<?php
	$qrsl_activeusersbydomain = "SELECT ref AS ID, smb_Name AS NAME 
			FROM systemoffice.main_users 
			LEFT OUTER JOIN systemoffice.staff_members ON smb_ID = StaffMember
			WHERE Type = 2 AND ref_office = ";